<template>
  <div>
      <button @click="login">登录</button>
  </div>
</template>

<script>

export default {
methods:{
    
  async  login(){
      await  this.$store.dispatch("login")
        this.$router.push('/')
      
    }
}
}
</script>

<style>

</style>